#ifndef MI2C_H_
#define MI2C_H_

#include <stdint.h>
#include <stdbool.h>

#define SLAVE_ADDRESS 0x2A //lcd1314 ADDR = L 0x2A       01010100
#define DATA_CH0 0x00
#define RCOUNT_CH0 0x08
#define SETTLECOUNT_CH0 0x10
#define CLOCK_DIVIDERS_CH0 0x14
#define STATUS 0x18
#define Config 0x1A
#define RESET_DEV 0x1C
#define MANUFACTURER_ID 0x7E
#define DEVICE_ID 0x7F

void I2C_Init(void);
void i2c_test(void);
void ldc1314_CH0(void);
void i2c_send_test(void);
void i2c_receive_test(void);
void i2c_data_send(uint32_t ui32Base, uint8_t slave_addr, uint8_t reg_addr, uint8_t* data, int index);
void i2c_data_get(uint32_t ui32Base, uint8_t slave_addr, uint8_t reg_addr, uint32_t* data, int index);

#endif
